<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include  file="/jsps/common/taglibs.jsp" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>


		<title>-订单结算-</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<script type="text/javascript" src="<c:url value="/js/Common.js"/>"></script>
		<script type="text/javascript" src="<c:url value="/js/jquery.js"/>"></script>
		<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
	   
		<script type="text/javascript">
		 $(document).ready(function(){
		
			$("#self").mouseover(function(){
		      $(this).css("cursor","pointer");
		    });
		 });
		function goBalance(){
		alert("ddd");
			//if(ckOrderForm()==true){
			//	if(confirm('你确定已经核实完定单，并且准备提交吗？')){
					document.orderForm.submit();
			//	}
		//	}
		}
	
	function ckRecevier(){
		var errorMsg = "请填写收货人姓名";
		var recevier = $('recevier');
		if(isEmpty(recevier)==true){
			window.alert(errorMsg);
			return false;
		}
		return true;
	}
	
	function ckRecevierAddr(){
		var errorMsg = "请填写收货人地址";
		var recevierAddr = $('recevierAddr');
		if(isEmpty(recevierAddr)==true){
			window.alert(errorMsg);
			return false;
		}
		return true;
	}
	
	function ckAgree(){
		var errorMsg = "请同意网络交易条款";
		var agree = document.getElementById('agree');
		//alert(agree.checked);
		if(agree.checked==false){
			window.alert(errorMsg);
			return false;
		}
		return true;
	}
	
	function ckOrderForm(){
		if(ckRecevier()==false){
			return false;
		}else if(ckRecevierAddr()==false){
			return false;
		}else if(ckAgree()==false){
			return false;
		}
		
		return true;
	}
        function sbt(){

            if(confirm('你确定已经核实完定单，并且准备提交吗？')){
	              document.orderForm.submit();
		      }

            


        }
	
</script>
		<link href="css/base.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" type="text/css" href="css/pro_dropdown_2.css" />
		<style>
table {
	border-collapse: collapse;
}

table td {
	empty-cells: show;
	font-size: 12px;
	color: #666;
}

.content {
	width: 1200px;
	margin: 0 auto;
	overflow: hidden;
}

.lookproduct {
	width: 1200px;
	height: 30px;
	border-bottom: #2791e3 solid 2px;
	position: relative;
	margin-top: 15px;
	float: left;
}

.lookproduct span {
	float: left;
	padding-top: 0px;
	height: 30px;
	background: url(images/a14.jpg) no-repeat center bottom;
	color: #0a7cd4;
	font-size: 18px;
	font-family: "微软雅黑";
}

.lookproduct5 {
	width: 1200px;
	height: 30px;
	border-bottom: #2791e3 solid 2px;
	position: relative;
	margin-top: 10px;
	float: left;
	position: relative;
}

.lookproduct5 span {
	float: left;
	padding-top: 0px;
	height: 30px;
	background: url(images/a14.jpg) no-repeat center bottom;
	color: #0a7cd4;
	font-size: 18px;
	font-family: "微软雅黑";
}

.confirm {
	width: 1165px;
	float: left;
	padding-left: 35px;
	overflow: hidden;
}

.confirm_text {
	width: 960px;
	float: left;
	padding-top: 15px;
}

.confirm_text h1 {
	float: left;
	padding-right: 10px;
	padding-top: 0px; *
	padding-top: 0px;
	_padding-top: 0px;
}

.confirm_text h2 {
	float: left;
	padding-right: 60px;
	padding-top: 0px; *
	padding-top: 5px;
	_padding-top: 5px;
}

.confirm_text1 {
	width: 930px;
	float: left;
	padding-top: 15px;
	padding-left: 65px;
}

.confirm_text1 h1 {
	width: 83px;
	float: left;
	line-height: 30px;
}

.confirm_text1 h1 span {
	color: #e41215;
	padding-right: 3px;
}

.confirm_text1 h2 {
	float: left;
}

.confirm_text1 h2 span {
	padding-top: 0px;
	padding-left: 3px;
	padding-right: 3px;
	line-height: 28px;
	color: #c2c2c2;
}

.confirminput {
	width: 142px;
	padding-left: 5px;
	height: 28px;
	border: #d9d9d9 solid 1px;
	line-height: 28px;
	color: #666;
	font-size: 12px;
	background: #fff;
}

.itemList {
	width: 1199px;
	float: left;
	border-left: #e0e0e0 solid 1px;
	margin-top: 20px;
}

.itemListborder {
	border-bottom: #e0e0e0 solid 1px;
	border-top: #e0e0e0 solid 1px;
	color: #666666;
	font-size: 12px;
	background: #fff5f5;
}

.itemListborder1 {
	border-bottom: #f2f2f2 solid 1px;
	color: #666666;
	font-size: 12px;
	background: #fff;
}

.itemList1 {
	width: 1198px;
	float: left;
	border: #e0e0e0 solid 1px;
	background: #fff5f5;
	position: relative;
	height: 37px;
}

.itemList1 h1 {
	position: absolute;
	top: 8px;
	right: 60px;
	float: left;
}

.itemList1 h1 .fontys1 {
	padding-right: 40px;
	float: left;
	color: #666;
	font-size: 16px;
	font-family: "微软雅黑";
}

.itemList20202 {
	float: left;
	padding-left: 39px;
	padding-top: 30px;
}

img {
	width: 100px;
	height: 29px;
}

.itemList20202 {
	float: right;
	margin-right: 85px;
	padding-left: 39px;
	padding-top: 10px;
}
</style>
	</head>

	<body>
		<div class="content">
			<form name="orderForm" action="<c:url value="/goodMgr?act=createOrder"/>" method="post">

				<div class="lookproduct">
					<span>收货人信息</span>
				</div>
				<div class="confirm">
					<div class="confirm_text1">
						<h1>
							收货人：
						</h1>
						<span><input type="text" name="receiver" id="recevier"
								class="confirminput"> </span>
					</div>
					<div class="confirm_text1">
						<h1>
							收货地址
						</h1>
						<h2>
							<input type="text" name="receiverAddr" id="recevierAddr"
								class="confirminput">
						</h2>
					</div>
				</div>


				<div class="lookproduct">
					<span>付款方式</span>
				</div>
				<div class="confirm">
					<div class="confirm_text">
						<h1>
							付款方式:
						</h1>
						<span> <input name="payMode" value="货到付狂" type="radio">货到付款
							<input name="payMode" value="银行汇款" type="radio" checked>银行汇款
							<input name="payMode" value="支付宝" type="radio">支付宝 </span>
					</div>
				</div>

				<div class="lookproduct">
					<span>收货方式</span>
				</div>
				<div class="confirm">
					<div class="confirm_text">
						<h1>
							收货方式：
						</h1>
						<span> <input name="getMode" value="邮局快递" type="radio"
								checked>邮局快递 <input name="getMode" value="特快邮递"
								type="radio">特快邮递 </span>
					</div>
				</div>

				<div class="lookproduct5">
					<span>商品清单</span>
				</div>
				<div class="itemList">
					<table width="1200" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td class="itemListborder" height="42" width="33"></td>
							<td width="600" align="left" valign="middle"
								class="itemListborder">
								商品
							</td>
							<td width="200" align="center" valign="middle"
								class="itemListborder">
								市场价格
							</td>
							<td width="200" align="center" valign="middle"
								class="itemListborder">
								数量(件)
							</td>
							<td width="200" align="center" valign="middle"
								class="itemListborder">
								小计
							</td>
						<tr>
							<c:forEach items="${cart.items}" var="item">
								<tr>
									<td width="33" height="42" align="center" valign="middle"
										class="itemListborder1"></td>
									<td width="600" align="left" valign="middle"
										class="itemListborder1">
										${item.good.goodsName}
									</td>
									<td width="200" align="center" valign="middle"
										class="itemListborder1">
										￥
										<fmt:formatNumber value="${item.good.goodsPrice}"
											pattern="0.00" />
									</td>
									<td width="200" align="center" valign="middle"
										class="itemListborder1">
										${item.goodNum}
									</td>
									<td width="200" align="center" valign="middle"
										class="itemListborder1">
										￥
										<fmt:formatNumber value="${item.totalPrice}" pattern="0.00" />
									</td>
								</tr>
							</c:forEach>
					</table>
					<!--[if !IE]>商品金额总计<![endif]-->
					<div class="itemList1">
						<h1>
							<span class="fontys1">商品金额总计:￥<fmt:formatNumber
									value="${cart.cartAmount}" pattern="0.00" />元</span>
						</h1>
					</div>

				</div>
		
		<!--[if !IE]>确认按钮-提交订单<![endif]-->
		<div class="itemList20202">
			<a id="self"><img  src="img/shopcart9.jpg"
				onclick="sbt();"></img></a>
		</div>
      </form>
      </div>
	</body>
</html>
